package com.zzyl.nursing.controller;

import com.zzyl.nursing.domain.Product;
import com.zzyl.nursing.service.IProductService;
import com.zzyl.common.core.domain.R;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

@RestController
@RequestMapping("/nursing/product")
@RequiredArgsConstructor
public class ProductController {
    private final IProductService productService;

    @GetMapping("/list")
    public R<List<Product>> list() {
        return R.ok(productService.listAll());
    }
} 